﻿namespace DesignModeConsole.行为型.策略模式;

/// <summary>
/// 策略定义
/// </summary>
public interface IStrategy
{
    void AlgorithmInterface();
}

public class ConcreteStrategyA : IStrategy
{
    public void AlgorithmInterface()
    {
        // 具体算法
        Console.WriteLine("实现A");
    }
}

public class ConcreteStrategyB : IStrategy
{
    public void AlgorithmInterface()
    {
        // 具体算法
        Console.WriteLine("实现B");
    }
}